
#ifndef DESIGN_PATTERNS_BUILDER_HPP
#define DESIGN_PATTERNS_BUILDER_HPP

/// header from standard library
#include <string>

namespace DesignPatterns {
	class builder;
	class pizza;
	class cook;
	class italian_pizza;
	class armenian_pizza;
}

/// @brief Creational pattern : builder
class DesignPatterns::builder
{
protected :
	pizza * m_p;	
public :	
	/// Member funcitons
	void create_product();
	pizza * get_product();
public :
	/// 
	virtual	void build_dough() = 0;
	virtual	void build_sauce() = 0;
	virtual	void build_topping() = 0;

	/// @name Special member functions
	virtual ~builder();
private:
	/// This class is not assignable
	builder& operator = (const builder&);
};

/// @brief class :  italian_pizza
class DesignPatterns::italian_pizza 
		: public DesignPatterns::builder
{
public :
	/// Re-defined virtual functions
	virtual	void build_dough();
	virtual	void build_sauce();
	virtual	void build_topping();

	/// @name Special member functions
private:
	italian_pizza& operator = (const italian_pizza&);
};

/// @brief class : armenian_pizza
class DesignPatterns::armenian_pizza
		: public DesignPatterns::builder
{
public :
	/// Re-defined virtual functions
	virtual	void build_dough();
	virtual	void build_sauce();
	virtual	void build_topping();

	/// @name Special member functions
public :
};

/// @brief class DesignPatterns::pizza
class DesignPatterns::pizza
{
/// only for testing purpose 
public :
	std::string m_topping;
	std::string m_sauce;
	std::string m_dough;

public :
	///Simple member functions
	void set_topping(const std::string);
	void set_sauce(const std::string);
	void set_dough(const std::string);

	/// @name Special member functions
        pizza();
private:
};

/// @brief class DesignPatterns::cook
class DesignPatterns::cook
{
private :
	builder * m_b;

public :
	/// Member functions
	void set_pizza_product(builder *);
	void create_pizza_product();
	pizza * get_pizza_product();


private:
	/// @name Special member functions
	~cook();
	/// This class is not assignable
	cook& operator = (const cook&);
};

#endif //DESIGN_PATTERNS_BUILDER_HPP
